package com.lalifa.googledate.api

import android.graphics.Color
import com.lalifa.googledate.util.Tool
import org.joda.time.LocalDate
import java.io.Serializable

/**
 *
 * @ClassName JsonBean
 * @Des
 */

open class BaseBean<T> : Serializable {
    var code: Int = 0
    var msg: String? = ""
    var time: String? = ""
    var data: T? = null
}

/**
 * @Des 上传文件
 */
data class FileBean(
    val fullurl: String,
    val url: String
)

data class LoginBean(
    val userinfo: LoginInfo
)

data class LoginInfo(
    val avatar: String,
    val createtime: Int,
    val expires_in: Int,
    val expiretime: Int,
    val id: Int,
    val mobile: String,
    val nickname: String,
    val score: Int,
    val token: String,
    val user_id: Int,
    val username: String
)

data class RegisterBean(
    val userinfo: UserBean
)

data class UserBean(
    val id: String,
    val token: String,
    val idToken: String,
    val type: String,
    val avatar: String,
    val username: String,
    val familyName: String,
    val email: String,
    val mobile: String
)

//type 0-默认通知 1-电子邮箱 2-短信
data class ChooseTimeBean(
    var timeStr: String = "",
    var time: Int = 5,
    var type: Int = 0,
    var isShow: Boolean = false
)

/**
 * @Des 国家假期
 * @param name 国家名称
 * @param isPublic 0 不显示 1公开假期
 */

data class CountryListBean(var countryList:List<CountryBean>)
data class CountryBean(
    var name: String = "",
    var isPublic: Int = 0
)

data class ColorBean(val value: String, val name: String)


data class ZcBean(val protocol: String,val policy: String)

data class CalendarBean(val id: Long,val name: String,val account: String,
                        val color: Int,val icon: String):Serializable
    //,ItemDrag  override var itemOrientationDrag: Int = VERTICAL
//通知消息-日历增删 type -1删除 1 新增
data class CalendarUp(val type: Int)

//通知消息-节假日增删 type -1删除 1 新增
data class HolidayUp(val type: Int)
//通知消息-事件
data class MessageEvent(var message: LocalDate,var id:Int = -1,var color: Int=Color.parseColor(Tool.color))
//通知消息-事件更新
data class AddEvent(var arrayList: ArrayList<EventModel>,var indexTracker:ArrayList<EventPositionBean>,var monthModels: ArrayList<MonthModel>)

data class EventListBean(var data : LocalDate, var event:EventInfo):Serializable
data class EventPositionBean(var localDate: LocalDate,var p:Int = 0)
data class RadioItem(val id: Int, val title: String, val value: Any = id)
data class EventModel(var eventname: String="", var localDate: LocalDate, var type: Int,var color: Int, var id: Int)
data class RemindBean(var id: String="",var startTime:Long=0,var title: String="",var content: String="",):Serializable

data class HolidayShowBean(
    val accessRole: String,
    val description: String,
    val etag: String,
    val items: List<HolidayItem>,
    val kind: String,
    val nextSyncToken: String,
    val summary: String,
    val timeZone: String,
    val updated: String
)

data class HolidayItem(
    val description: String,
    val end: End,
    val organizer: Organizer,
    val start: Start,
    val summary: String
)

data class End(
    val date: String
)

data class Organizer(
    val displayName: String,
    val email: String,
    val self: Boolean
)

data class Start(
    val date: String
)